<div class="orders form">
<div class="actions specific">
	<ul>
		<li><?php
                if(empty ($this->data['Order']['date_recibed'])){
                    echo $this->Html->link(__('Confirmar', true), array('action' => 'confirm', $this->Form->value('Order.id'))); 
                }
                ?></li>
		<li><?php echo $this->Html->link(__('Eliminar', true), array('action' => 'delete', $this->Form->value('Order.id')), null, sprintf(__('Esta seguro que desea eliminar # %s?', true), $this->Form->value('Order.id'))); ?></li>
	</ul>
</div>
<?php echo $this->Form->create('Order');?>
	<fieldset>
		<legend><?php __('Editar Pedido'); ?></legend>
	<?php
		echo $this->Form->input('id', array('label' => 'Id'));
		echo $this->Form->input('date', array('label' => 'Fecha Emision', 'type' => 'text'));
		echo $this->Form->input('amount', array('label' => 'Cantidad'));
		echo $this->Form->input('article_id', array('label' => 'Articulo', 'disabled' => 'disabled'));
		echo $this->Form->input('supplier_id', array('label' => 'Proveedor'));
		echo $this->Form->input('date_recibed', array('label' => 'Fecha Recibido', 'type' => 'text', 'disabled' => 'disabled'));
		echo $this->Form->input('amount_recibed', array('label' => 'Cantidad Recibida', 'readonly' => 'readonly'));
	?>
	</fieldset>
<?php echo $this->Form->end(__('Guardar', true));?>
</div>
<script type="text/javascript">
    (function($){
        // Date picker
        $("#OrderDate").datepicker({
            //yearRange: '1970:2010',
            defaultDate: new Date(),
            dateFormat: 'dd/mm/yy',
            changeMonth: true,
            changeYear: true
        });
        
        //toda la documentacion de esta librería la encontras aca
        //http://jqueryui.com/demos/datepicker/
    })(jQuery);
</script>
<script type="text/javascript">
    (function($){
        // Date picker
        $("#OrderDateRecibed").datepicker({
            //yearRange: '1970:2010',
            defaultDate: new Date(),
            dateFormat: 'dd/mm/yy',
            changeMonth: true,
            changeYear: true
        });
        
        //toda la documentacion de esta librería la encontras aca
        //http://jqueryui.com/demos/datepicker/
    })(jQuery);
</script>